TsgDrawingNavigator
Unit:TsgDrawingNavigator
Description
The TsgDrawingNavigator
component is intended for displaying files of various graphic formats. It descends from the TsgCustomControl
.
The main features of the TsgDrawingNavigator
class:
- loading files
LoadFromFile
; - fitting selected by mouse rectangle within visible part of the control;
- scaling by mouse wheel;
- scaling by function
AfterScale
; - panning by middle or right mouse button;
- panning by scroll bars;
- panning and scaling by function
ShowRect
; - getting previous states of control
CallPreviousView
; - fitting image within visible part of the control
FitToSize
; - stretching within visible part of the control
Stretch
; - snap
SnapControl
; - converting point to drawing coordinates
GetDrawingCoords
; - converting point to inner drawing's coordinates
GetDrawingInternalCoords
; - converting point to inner drawing's coordinates without snapping
GetDrawingInternalCoordsWithoutSnap
; - converting point UCS drawing's coordinates
GetDrawingUCSCoords
-- for DXF and DWG only; - displaying necessary point
ShowPoint
; - changing background color
Color
; - 3D viewing
Orbit3D
.
Properties
Properties | Description |
---|---|
ActualGraphic | The property returns Picture.Graphic bounded by clipping rectangle or rectangle. |
Align | The property aligns a control to the top, bottom, left, or right of its parent. |
Anchors | The property ensures that a control maintains its current position relative to an edge of its parent. |
AutoFocus | The property defines whether control has focus or not and whether it receives keyboard and mouse movement events. |
Canvas | The property returns control's canvas. |
CenterAlignment | The property centers the image according to the client control. |
ClipRectangle | The property defines whether clipping mode is on or off. |
ClipRectCoords | The property sets or gets clipping rectangle coordinates. |
ClipRectPopupMenu | The property sets or gets clipping rectangle coordinates. |
Color | The property changes the background color of the component. |
Constraints | The property specifies the minimum and maximum width and height of the control. |
DragCursor | The property changes the cursor image presented when the component is being dragged. |
DragKind | The property gets or sets whether the component participates in drag-and-drop operations, or drag-and-dock operations. |
DragMode | The property enables or disables the drag-and-drop or drag-and-dock capability. |
Enabled | The property changes the availability of the control to the user. |
HorzScrollBar | The property defines horizontal scroll bar. |
LinearDimensionsMode | The property returns DWG/DXF distance units modes. |
LinearDimensionsScale | The property sets or gets scale factor. |
MouseDragging | The property defines whether dragging by mouse is available. |
MouseScaling | The property defines whether scaling by left mouse is available. |
Orbit3D | The property defines whether 3D Orbit mode is on or off. |
ParentShowHint | The property ensures that all controls on a form either uniformly show their Help Hints or uniformly do not show them. |
Picture | The property specifies the image for the TsgDrawingNavigator component. |
PictureHeight | The property returns height of the control's drawing rectangle. |
PictureRect | The property sets or gets extents of the control's drawing rectangle. |
PictureWidth | The property returns width of the control's drawing rectangle. |
PopupMenu | The property makes a pop-up menu appear when the user selects the control and clicks the right mouse button. |
RectZooming | The property defines whether scaling is available by selecting. |
Scale | The property sets or gets scale factor. |
ScalingOnMouseWheel | The property permits or forbids scaling by mouse wheel. |
ShowHint | The property determines whether the control displays Help Hint when the mouse pointer rests momentarily on the control. |
SnapControl | The property returns the object of the TSnapControl class. |
Stretch | The property defines whether image to be stretched within visible part of the control or not. |
VertScrollBar | The property defines vertical scroll bar. |
ViewRectMode | The property defines working modes of the ActualGraphic property. |
Visible | The property sets the visibility of the control. |
ZoomInChange | The property defines the scale factor when increasing image. |
ZoomOutChange | The property defines the scale factor when decreasing image. |
Methods
Methods | Description |
---|---|
AfterScale | The method scales the drawing. |
CallPreviousView | The method views drawing with previous scale and position. |
Center | The method returns center point of the control. |
Create | The method creates and initializes an instance of the TsgDrawingNavigator class. |
Destroy | The method destroys the TsgDrawingNavigator object. |
Empty | The method checks that the object exists. |
FitToSize | The method draws and centers image within the borders of the control. |
GetDrawingCoords | The method returns point on the drawing respectively to the input controls' coordinates. |
GetDrawingInternalCoords | The method returns point of the drawing respectively to the entered X and Y coordinates. |
GetDrawingInternalCoordsWithoutSnap | The method returns UCS point of the drawing respectively to the entered X and Y coordinates. |
GetDrawingUCSCoords | The method draws and centers image within the borders of the control. |
GetRealPoint | The method returns the real point. |
HasPreviousView | The method returns True if the drawing was scaled, otherwise returns False . |
HeightToWeightRatio | The method returns ratio between height and width of the drawing. |
KeepCurrentView | The method memorizes current scale and position of the drawing. |
LoadFromFile | The method loads image file with specified filename. |
ShowPoint | The method views drawing's point specified by the APoint parameter and sets current scale by the AScale parameter. |
ShowRect | The method views image centering specified by ARect in the middle of the control. |
Events
Events | Description |
---|---|
OnChangeScale | The event occurs when control's PictureHeight or PictureWidth properties were changed. |
OnClick | The event occurs when the user clicks the control. |
OnContextPopup | The event occurs when the user uses the mouse or keyboard to request a popup menu. |
OnDblClick | The event occurs when the user double-clicks the mouse. |
OnDragDrop | The event occurs when the user drags and drops the object. |
OnDragOver | The event occurs when a drag-and-dock operation stops. |
OnEndDock | The event specifies actions or special processing that when a drag-and-dock operation stops. |
OnEndDrag | The event specifies any special processing that occurs when dragging stops. |
OnMouseDown | The event specifies any special processing that should occur as a result of pressing a mouse button. |
OnMouseMove | The event occurs when the mouse pointer moves after the control has captured the mouse. |
OnMouseUp | The event specifies any special processing when the user releases a mouse button. |
OnPaint | The event occurs when the system repaints the TsgDrawingNavigator control. |
OnPictureMove | The event occurs when control's PictureRect being changed. |
OnProgress | The event occurs during slow operations such as loading large compressed images. |
OnStartDock | The event occurs when the user starts a drag-and-dock operation by dragging the control. |
OnStartDrag | The event occurs when the user starts to drag the control or an object it contains. |